package com.xuanyuan.viewfunc;

import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.widget.Toast;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;

import com.xuanyuan.baselibaray.ArouterUtils;
import com.xuanyuan.viewfunc.databinding.ActivityMainBinding;
import com.xuanyuan.viewfunc.mask.ImageMaskActivity;
import com.xuanyuan.viewfunc.mask.LayoutMaskActivity;
import com.xuanyuan.viewfunc.mask.LocalMaskActivity;


/**
 * @author ken.luo
 */
public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    ActivityMainBinding mBinding;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mBinding = DataBindingUtil.setContentView(this, R.layout.activity_main);
        mBinding.setClick(this);

    }

    @Override
    public void onClick(View view) {
        if (view == null) {
            return;
        }

        if (view == mBinding.btnMaskView) {
            ArouterUtils.INSTANCE.startActivityCommon(this, ImageMaskActivity.class);
        } else if (view == mBinding.btnMaskLayout) {
            ArouterUtils.INSTANCE.startActivityCommon(this, LayoutMaskActivity.class);
        } else if (view == mBinding.btnMaskLocal) {
            ArouterUtils.INSTANCE.startActivityCommon(this, LocalMaskActivity.class);
        }





    }


}